package com.maslyk.configuration;

import java.util.HashMap;

/**
 *
 * @author kris
 */
public class DataCache 
{
    private static HashMap<Long,Object> cache;
    private static DataCache instance;

    public static synchronized DataCache getInstance()
    {
        if(instance == null)
        {
            instance = new DataCache();
            return instance;
        }
        else
            return instance;
    }
    
    private DataCache()
    {
        cache = new HashMap<Long,Object>();
    }
    
    public HashMap<Long, Object> getCache()
    {
        return cache;
    }
    
    public void clearCache()
    {
        cache = null;
        instance = null;
    }
}
